import {Counter} from "./features/counter/Counter"
import {Plus} from "./features/counter/Plus"
import {useEffect, useRef} from "react";

export default function InitApp() {

  const countRef = useRef();
  const plusRef = useRef();
  useEffect(() => {
    console.log(countRef);
    console.log(plusRef);
  }, []);
  return (
    <>
     <Counter ref={countRef}/>
     <Plus ref={plusRef}/>
     <button onClick={() => {
       countRef.current.add()
     }}>Click</button>
    </>
  );
}